package com.hgl.servlet.admin;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hgl.entity.Hgl;
import com.hgl.service.HglService;
import com.hgl.service.impl.HglServiceImpl;
import com.hgl.vo.HglVO;


@WebServlet("/admin/user-search.let")
public class SearchListServlet extends HttpServlet{

	private HglService hglService = new HglServiceImpl();
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
//		int len=10;
//		try{
//		len=Integer.valueOf(request.getParameter("len"));
//		
//		} catch (Exception ex){
//		
//		}
		String name=" ";
		name=request.getParameter("search") ;
		
		List<Hgl> list=hglService.search(name);
		
		request.setAttribute("list", list);
		request.getRequestDispatcher("/admin/user-search.jsp").forward(request,response);
	}
}
